<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.show {
				width: 400px;
				overflow: hidden;
			}
			
			.box {
				width: 800px;
				height: 100px;
				position: relative;
			}
			
			.halou {
				float: left;
				width: 200px;
				height: 200px;
				background-color: red;
			}
		</style>
		<script type="text/javascript" src="js/jquery-3.0.0.js"></script>
	</head>

	<body>
		<div class="show">
			<div class="box">
				<div class="halou" style="background-color: green;">1</div>
				<div class="halou" style="background-color: blue;">2</div>
				<div class="halou" style="background-color: orange;">3</div>
				<div class="halou" style="background-color: cornflowerblue;">4</div>
			</div>
		</div>
		<script>
			function m() {
						$(".box").animate({
								left: -400
							}, 2000, "linear", function() {
								$(".box").css({
										left: 0
									}) 
									setTimeout(m, 0)
								})
						}
						m()
		</script>

	</body>

</html>